<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>{% block title %}Projet{% endblock %}</title>
        {% block stylesheets %}
        <link rel="stylesheet" href="{{ asset('style.css') }}" type="text/css" />
        <link rel="stylesheet" href="{{ asset('css/kickstart.css') }}" type="text/css" />
        {% endblock %}
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
        <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
        <script type="text/javascript" src="{{ asset('js/prettify.js') }}"></script>                                   
        <!-- PRETTIFY -->
        <script type="text/javascript" src="{{ asset('js/kickstart.js') }}"></script> 
        <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />

    </head>
    <body>
        <div id="header">
            <div class="col_12 column right">
                {% if app.user == true %} 
                   {{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }} |
                    <a href="{{ path('fos_user_security_logout') }}">
                                {{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
                        </a>
                {% endif %}
                    </div>
                </div>
                <div id="wrap" class="clearfix">
                    <div id="nav">
                        <ul class="menu">
                            <li><a href="{{path("fos_user_profile_show")}}"><span class="icon small darkgray" data-icon="I"></span> Accueil</a></li>
                          <li><a href="{{path("groupe")}}"><span class="icon small darkgray" data-icon='"'></span> Groupes</a></li>
                            {% if is_granted('ROLE_ADMIN') %}
                                <li><a href="{{path("ProjetAAdminBundle_homepage")}}"><span class="icon darkgray small" data-icon="Z"></span>Admin</a></li>
                            {% endif %}
                            <!--  <li><a href=""><span class="icon small darkgray" data-icon="s"></span> Recherche</a></li>
                            <li class="right"><span>
                                    <form action="{{ path('groupe_recherche') }}" method="post">
                                        <input required="required" placeholder="Rechercher" name="recherche" /> <button type="submit" class="small blue"><span class="icon white small" data-icon="s"></span>Rechercher</button>
                                    </form>
                                </span> </li> -->
                        </ul>
                        <div id="recherche">
                            <form action="{{ path('groupe_recherche') }}" method="post">
                                <input required="required" placeholder="Rechercher" name="recherche" /> <button type="submit" class="small blue"><span class="icon white small" data-icon="s"></span>Rechercher</button>
                            </form>
                        </div>
                    </div>
                        
                    <div class="col_12">
                        <h3>{% block titre %}{% endblock %}</h3>
                        {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
                            
                            {% block body %}{% endblock %}
                            {% block javascripts %}{% endblock %}
                        {% else %}
                            {% block connexion %}
                                <div class="center">
                                    <img src="{{ asset('img/security.png') }}" alt="security" />
                                </div>
                                <div class="center">
                                    Vous devez être connecté !
                                </div>
                                <div class="center">
                                    <a href="{{path("fos_user_security_login")}}" class="btn medium blue">Connexion</a>
                                </div>
                        {% endblock %}
                        {% endif %}
                    </div>
                </div>
            </body>
        </html>
